<template>
	<div class="mainContent">
		<div class="bread-nav">
			<span class="bread-item">仓储管理</span>
			<span class="bread-icon">&gt;</span>
			<span class="bread-item">调拨管理</span>
			<span class="bread-icon">&gt;</span>
			<span class="bread-item activeNavs" @click="toInside">调拨出库</span>
			<span class="bread-icon">&gt;</span>
			<span class="bread-item">调拨出库详情</span>
		</div>
		<!-- <pathTracking :path="Model.path" /> -->
		<div class="container">
			<!-- 一级tabs -->
			<el-tabs v-model="Model.activeTab" @tab-click="onTabChange">
				<el-tab-pane label="调拨入库单详情" name="1"></el-tab-pane>
				<el-tab-pane label="操作日志" name="2"></el-tab-pane>
			</el-tabs>
			<div class="tabBox">
				<el-row class="detailTable">
					<el-form :inline="true">
						<el-col :sm="24" :md="12" :lg="8" :xl="6" v-for="(item,index) in Model.tabFormInline" :key="index">
							<el-form-item v-if="item.label == '单据状态'" :label="item.label+'：'">{{item.value | statusFilters}}</el-form-item>
							<el-form-item v-else :label="item.label+'：'">{{item.value}}</el-form-item>
						</el-col>
					</el-form>
				</el-row>
				<div class="tabBoxStep">
					<el-steps :active="Model.refundStep.activeStep">
						<el-step :title="item.title" :description="item.description" v-for="(item,index) in Model.refundStep.step" :key="index"></el-step>
					</el-steps>
				</div>
				<el-row class="detailTable">
					<div class="detailTableItemTitle">
						<img class="detailTableImgSmall" src="@/assets/img/flower_brown.png" alt="">
						<p class="text">订单基础信息</p>
						<!-- <img class="detailTableImgNormal" src="@/assets/img/icon_edit.png" @click="onDialogEdit(true,'tableFormInline')"> -->
						<img class="detailTableImgNormal" :src="Model.detailTableFrom.src" alt="" @click="toggleTableDetail('detailTableFrom')">
					</div>
					<el-form :inline="true" v-show="Model.detailTableFrom.flag">
						<el-col :sm="24" :md="12" :lg="8" :xl="6" v-for="(item,index) in Model.tableFormInline" :key="index">
							<el-form-item :label="item.label+'：'">{{item.value}}</el-form-item>
						</el-col>
					</el-form>
				</el-row>
				<!-- **********************************************               tab1  订单详情                 ************************************** -->
				<div v-show="Model.activeTab==1">
					<el-row class="detailTable">
						<div class="detailTableItemTitle">
							<img class="detailTableImgSmall" src="@/assets/img/flower_brown.png" alt="">
							<p class="text">调拨出库明细 — 应出</p>
							<img class="detailTableImgNormal" :src="Model.tab1TableDetail1.src" alt="" @click="toggleTableDetail('tab1TableDetail1')">
						</div>
						<div class="detailTableDetail" v-show="Model.tab1TableDetail1.flag">
							<el-table stripe :data="Model.tab1TableData1" border show-summary :summary-method="getSummaries"
							 @selection-change="handleSelectionChange">
								<el-table-column type="index" width="50" label="序号" fixed></el-table-column>
								<el-table-column v-for="(item,index) in Model.tab1TableHeader" :key="index" :prop="item.prop" :label="item.label"
								 :width="item.width">
								</el-table-column>
							</el-table>
						</div>
					</el-row>
					<el-row class="detailTable">
						<div class="detailTableItemTitle">
							<img class="detailTableImgSmall" src="@/assets/img/flower_brown.png" alt="">
							<p class="text">调拨出库明细 — 实出</p>
							<img class="detailTableImgNormal" :src="Model.tab1TableDetail1.src" alt="" @click="toggleTableDetail('tab1TableDetail1')">
						</div>
						<div class="detailTableDetail" v-show="Model.tab1TableDetail1.flag">
							<el-table stripe :data="Model.tab1TableData2" border show-summary :summary-method="getSummaries"
							 @selection-change="handleSelectionChange">
								<el-table-column type="index" width="50" label="序号" fixed></el-table-column>
								<el-table-column v-for="(item,index) in Model.tab1TableHeader" :key="index" :prop="item.prop" :label="item.label"
								 :width="item.width">
								</el-table-column>
							</el-table>
						</div>
					</el-row>
				</div>
				<!-- **********************************************               tab2    操作日志              ************************************** -->
				<div v-show="Model.activeTab==2">
					<el-row class="detailTable">
						<div class="detailTableItemTitle">
							<img class="detailTableImgSmall" src="@/assets/img/flower_brown.png" alt="">
							<p class="text">订单操作日志</p>
							<img class="detailTableImgNormal" :src="Model.tab2TableDetail1.src" alt="" @click="toggleTableDetail('tab2TableDetail1')">
						</div>
						<div class="detailTableDetail" v-show="Model.tab2TableDetail1.flag">
							<el-table stripe :data="Model.tab2TableData" border max-height="550" @selection-change="handleSelectionChange">
								<el-table-column align="center" prop="createTime" label="时间" width="100"></el-table-column>
								<el-table-column align="center" prop="type" label="操作类型" width="120"></el-table-column>
								<el-table-column align="center" prop="createBy" label="操作人" width="120"></el-table-column>
								<el-table-column align="center" prop="record" label="操作记录"></el-table-column>
							</el-table>
						</div>
					</el-row>
				</div>

			</div>
		</div>
		<!-- 弹框 -->
		<!-- <el-dialog :visible.sync="Model.editDialogFlag" top="100px" class="viewDialog">
			<div class="common-table-title">
				<div class="common-table-icon"></div>
				<div class="common-table-fl">弹框</div>
			</div>
			<div style="padding:30px;background: #fff;">
				
			</div>
		</el-dialog> -->

	</div>
</template>

<script>
	import pathTracking from "@/components/common/pathTracking";
	import pagination from "@/components/common/pagination.vue";
	import advancedSearch from "@/components/common/filter/advancedSearch";
	import {
		getDateString
	} from "@/assets/js/common.js";
	import Model from "./model.js";
	import Controller from "./controller.js";
	export default {
		name: "insideDetail",
		mixins: [Model, Controller],
		components: {
			advancedSearch,
			pagination,
			pathTracking
		}
	};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
	@import "./index.less";
</style>
